import os
import sys

currentPath = os.path.dirname(__file__)
#append the project root path
sys.path.insert(0, os.path.join(currentPath, "hello_webapp2"))

from myapp import *

#app = webapp2.WSGIApplication([('/', MainPage),
#                              ('/shutdown', shutdown)],
#                              debug=True)
#

app = webapp2.WSGIApplication([
                ('/', MyHandler),
                ('/extra', MainPage),
                ('/shutdown', shutdown)
            ], debug=True)


##Don't know why it does not work with paste!
#def main():
#    from paste import httpserver
##    httpserver.serve(app, host=ip(), port="8080")
#    httpserver.serve(app, host="127.0.0.1", port="8080")
#
#
#if __name__ == "__main__":
#    main()